load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")

cc_library(
    name = "problem_solutions",
    srcs = glob(["utils/*.cc"]),
    hdrs = glob([
        "problems/*.h",
        "utils/*.h",
    ]),
)

cc_test(
    name = "test_problem_solutions",
    srcs = glob([
        "tests/problem_solution_tests/*.cc",
    ]),
    deps = [
        "problem_solutions",
        "@com_google_googletest//:gtest_main",
    ],
)

cc_library(
    name = "jianzhi_solutions",
    srcs = glob(["utils/*.cc"]),
    hdrs = glob([
        "jianzhi/*.h",
        "utils/*.h",
    ]),
)

cc_test(
    name = "test_jianzhi_solutions",
    srcs = glob([
        "tests/jianzhi_solution_tests/*.cc",
    ]),
    deps = [
        "jianzhi_solutions",
        "@com_google_googletest//:gtest_main",
    ],
)

cc_library(
    name = "contest_solutions",
    srcs = glob(["utils/*.cc"]),
    hdrs = glob([
        "contests/*.h",
        "utils/*.h",
    ]),
)

cc_test(
    name = "test_contest_solutions",
    srcs = glob([
        "tests/contest_solution_tests/*.cc",
    ]),
    deps = [
        "contest_solutions",
        "@com_google_googletest//:gtest_main",
    ],
)
